package org.mybatis3.test5;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test6 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        Dog d1=(Dog) context.getBean("dog5");

        System.out.println(d1.getName());
        List<Dog> sons=d1.getSonList();
        for (Dog dog:sons){
            System.out.println("儿子:"+dog.getName());
        }
    }
}
